import junit.framework.TestCase;
import java.awt.Color;

/**
 * 
 */

/**
 * @author Patrik
 *
 */
public class GameMaptest extends TestCase {

	/**
	 * @param name
	 */
	public GameMaptest(String name) {
		super(name);
	}

	/* (non-Javadoc)
	 * @see junit.framework.TestCase#setUp()
	 */
	protected void setUp() throws Exception {
		super.setUp();
	}

	/* (non-Javadoc)
	 * @see junit.framework.TestCase#tearDown()
	 */
	protected void tearDown() throws Exception {
		super.tearDown();
	}
	
	public void testGameMap(){
		GameMap map=new GameMap(200,5);
		assertEquals(202,GameMap.getSideLength());
		assertEquals(null,GameMap.getPlayerPosition(1));
		assertEquals(100,GameMap.getPosition(0,0));
		GameMap.setPosition(55, 87, -1);
		GameMap.setPosition(54, 87, 1);
		assertEquals(55,GameMap.getPlayerPosition(1)[0]);
		assertEquals(87,GameMap.getPlayerPosition(1)[1]);
		assertEquals(1,GameMap.getPosition(54,87));
		assertTrue(GameMap.getColor(2) instanceof Color);
	}

}
